<template>
    <div class="board-content">
        <div class="board-body">
            <div class="board-header">
                <div class="board-title">
                    {{ title }}
                </div>
            </div>
            <div class="board-main">
                <div class="board-handle">
                    <div class="board-button">
                        <el-button type="warning" icon="fa fa-refresh" @click="list()" size="small"> 刷新</el-button>

                    </div>
                </div>
                <el-table element-loading-text="努力加载中..."
                          element-loading-spinner="el-icon-loading"
                          ref="multipleHandle"
                          tooltip-effect="dark"
                          v-loading="loading"
                          :data="listData" border>
                    <el-table-column prop="street_text" label="乡镇街道" width="300"></el-table-column>
                    <el-table-column prop="mumber" label="排查数量"></el-table-column>
                </el-table>
            </div>
        </div>
    </div>
</template>

<script>
import {mapState} from "vuex";
import {ArticleChart} from '../../utils/request';

export default {
    computed: {
        ...mapState({
            title: state => state.title,
        }),
    },
    data: function () {
        return {
            loading: false,
            listData: [],
        }
    },
    activated() {
        this.list();
    },
    methods: {
        list() {
            this.loading = true;
            ArticleChart(this.params).then((res) => {
                if (res.status) {
                    this.$func.error(res.message);
                } else {
                    this.listData = res.data;
                }
                this.loading = false;
            }).catch((e) => {
                this.loading = false;
            });
        },
    }
}
</script>
<style>
    .c_item{
        margin-top: 5px;
    }
</style>
